package cn.lbd.api.designMode.proxy.staticproxy;

public class UserServiceProxy implements UserService{
    private UserServiceImpl userService;

    public void setUserService(UserServiceImpl userService) {
        this.userService = userService;
    }


    @Override
    public void add() {
        Log("add");
        userService.add();
    }

    @Override
    public void update() {
        Log("update");
        userService.update();
    }

    @Override
    public void delete() {
        Log("delete");
        userService.delete();
    }

    @Override
    public void query() {
        Log("query");
        userService.query();
    }

    public void Log(String msg){
        System.out.println("【Debug】  执行了"+msg+"方法");
    }
}
